package com.ruoyi.party.system.domain;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 党员基本信息对象 p_member
 * 
 * @author 黄宝康
 * @date 2021-04-16
 */
public class Member extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 党员编号 */
    @Excel(name = "党员编号")
    @NotBlank(message = "党员编号不能为空")
    @Size(min = 0, max = 10, message = "党员编号长度不能超过10个字符")
    private String memberId;

    /** 党员姓名 */
    @Excel(name = "党员姓名")
    @NotBlank(message = "党员姓名不能为空")
    @Size(min = 0, max = 30, message = "党员姓名长度不能超过30个字符")
    private String memberName;

    /** 身份证号 */
    @Excel(name = "身份证号")
    @NotBlank(message = "身份证号不能为空")
    @Size(min = 0, max = 18, message = "身份证号长度不能超过18个字符")
    private String card;

    /** 出生年月日 */
    @Excel(name = "出生年月日")
    @NotBlank(message = "出生年月日不能为空")
    @Size(min = 0, max = 10, message = "出生年月日长度不能超过10个字符")
    private String birthday;

    /** 政治生日 */
    @Excel(name = "政治生日")
    @NotBlank(message = "政治生日不能为空")
    @Size(min = 0, max = 10, message = "政治生日长度不能超过10个字符")
    private String partyBirthday;

    /** 行政级别 */
    @Excel(name = "行政级别")
    @NotBlank(message = "行政级别不能为空")
    @Size(min = 0, max = 2, message = "行政级别长度不能超过2个字符")
    private String adminLevel;

    /** 党内职务 */
    @Excel(name = "党内职务")
    @NotBlank(message = "党内职务不能为空")
    @Size(min = 0, max = 3, message = "党内职务长度不能超过3个字符")
    private String partyDuty;

    /** 所属支部 */
    @Excel(name = "所属支部")
    @NotBlank(message = "所属支部不能为空")
    @Size(min = 0, max = 10, message = "所属支部长度不能超过10个字符")
    private String orgId;

    /** 所属党小组 */
    @Excel(name = "所属党小组")
    @Size(min = 0, max = 10, message = "所属党小组长度不能超过10个字符")
    private String orgGid;

    
    // 冗余字段，用于列表查询支部名称，党小组名称
    private String orgName;
    private String orgGname;
    // 新需求，党员密码
    @Size(min = 0, max = 50, message = "所属党小组长度不能超过50个字符")
    private String memberPwd;
    
    /** 角色组 */
    private Long[] roleIds;
    
    public void setMemberId(String memberId) 
    {
        this.memberId = memberId;
    }

    public String getMemberId() 
    {
        return memberId;
    }
    public void setMemberName(String memberName) 
    {
        this.memberName = memberName;
    }

    public String getMemberName() 
    {
        return memberName;
    }
    public void setCard(String card) 
    {
        this.card = card;
    }

    public String getCard() 
    {
        return card;
    }
    public void setBirthday(String birthday) 
    {
        this.birthday = birthday;
    }

    public String getBirthday() 
    {
        return birthday;
    }
    public void setPartyBirthday(String partyBirthday) 
    {
        this.partyBirthday = partyBirthday;
    }

    public String getPartyBirthday() 
    {
        return partyBirthday;
    }
    public void setAdminLevel(String adminLevel) 
    {
        this.adminLevel = adminLevel;
    }

    public String getAdminLevel() 
    {
        return adminLevel;
    }
    public void setPartyDuty(String partyDuty) 
    {
        this.partyDuty = partyDuty;
    }

    public String getPartyDuty() 
    {
        return partyDuty;
    }
    public void setOrgId(String orgId) 
    {
        this.orgId = orgId;
    }

    public String getOrgId() 
    {
        return orgId;
    }
    public void setOrgGid(String orgGid) 
    {
        this.orgGid = orgGid;
    }

    public String getOrgGid() 
    {
        return orgGid;
    }
    
    

    public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	public String getOrgGname() {
		return orgGname;
	}

	public void setOrgGname(String orgGname) {
		this.orgGname = orgGname;
	}
	
	
	@JsonIgnore
	public String getMemberPwd() {
		return memberPwd;
	}

	public void setMemberPwd(String memberPwd) {
		this.memberPwd = memberPwd;
	}

	
	public Long[] getRoleIds() {
		return roleIds;
	}

	public void setRoleIds(Long[] roleIds) {
		this.roleIds = roleIds;
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("memberId", getMemberId())
            .append("memberName", getMemberName())
            .append("card", getCard())
            .append("birthday", getBirthday())
            .append("partyBirthday", getPartyBirthday())
            .append("adminLevel", getAdminLevel())
            .append("partyDuty", getPartyDuty())
            .append("orgId", getOrgId())
            .append("orgGid", getOrgGid())
            .append("orgName", getOrgName())
            .append("orgGname", getOrgGname())
            .append("memberPwd",getMemberPwd())
            .toString();
    }
}
